/*
 * @Author: zehao.chen
 * @Date: 2022-11-15 16:03:24
 * @LastEditors: zehao.chen
 * @LastEditTime: 2022-11-23 17:05:42
 * @FilePath: /meeting-admin/src/views/meetingList/tableCol/meetingDescCol.js
 * @Description:
 *
 */
import {sortCNOrder} from "@/utils/utils";

export const applicationListCol = [
  {
    label: "名称",
    prop: 'slot',
    slotName: 'media_name',
    sortable: 'custom',
    customSort: (row, order) => {
      const tmpList = row.sort((a, b) => {
        let str1 = a['media_name'].split('')[0]
        let str2 = b['media_name'].split('')[0]
        return sortCNOrder(str1, str2, order)
      })

      if(order) {
        return tmpList
      } else {
        return row
      }
    },
    width: "120",
    isShow: true,
    isEdit: false,
  },
  {
    label: "网址",
    prop: "location",
    width: "120",
    isShow: true,
    isEdit: false,
  },
  {
    label: "组名",
    prop: "group_name",
    width: "120",
    sortable: true,
    isShow: true,
    isEdit: false,
  },
  {
    label: "上传者",
    prop: "create_by",
    width: "120",
    isShow: true,
    isEdit: false,
  },
  {
    label: "上传时间",
    prop: "create_date",
    width: "120",
    sortable: true,
    isShow: true,
    isEdit: false,
  },
  {
    label: "状态",
    prop: "status",
    width: "120",
    filter: 'keyValue',
    options: ['', '有效', '已删除'],
    isShow: true,
    isEdit: false,
  },
]
